-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Angular 15 #36
base: master
Are you sure you want to change the base?
Conversation
088306d
to
a6bf947
Compare
This appears to be a clean upgrade. I had to upgrade TSC as well, but nothing seems broken and the changelog looks promissing. https://angular.io/guide/update-to-version-14
Update node 14.18 to 18.17 Update npm 6.14 to 10.1 Update primeng 13 to 15 Update ng-recaptcha 9 to 11 Remove ngx-google-analytics
It appears as though some things that were skating through tsc are no longer ignorable. This types some model methods and request handlers more strictly but makes no functional changes.
There's a new syntax for finding the test files and starting up. https://stackoverflow.com/a/74886791/848249
Due to an optimistic type change earlier in the upgrade it was possible here to send through an empty string which angers Mongo. Since we've typed the var strictly to a string we can check here for an empty string explicitly.
a6bf947
to
7a42d87
Compare
The frontend was already on 18 but the backend was separately using 14. This update involved only meaningful changes in the Dockerfile.
7a42d87
to
c25e9d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR upgrades the application to Angular 15 and updates associated dependencies such as Node, npm, primeng, and ng-recaptcha while removing the ngx‑google‑analytics integration.
- Improved type annotations and code style consistency in API controllers
- Updated dependency versions and CI workflow configurations
- Adjusted the testing setup to align with changes in Angular 15
Reviewed Changes
File | Description |
---|---|
app/api/blueprint-controller.ts | Code style updates and enhanced type definitions for request objects |
frontend/src/test.ts | Updates to the Angular testing setup |
app/api/duplicate-check-controller.ts | Improved callback typings for Mongoose |
app/api/login-controller.ts | Enhanced type annotations in the authentication callback |
.github/workflows/frontend_install/action.yml | Updated Node.js version for the frontend installation workflow |
app/api/models/user.ts | Refined UserModel schema and crypto usage |
frontend/src/app/app.module.ts | Removal of ngx‑google‑analytics module |
app/api/auth.ts | Updated callback error typing and import adjustments |
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
frontend/src/test.ts:8
- [nitpick] The removal of the test module loader code (using require.context) suggests a change in the test discovery mechanism. Please confirm that all test files are still being discovered and executed under the new Angular testing setup.
// Then we find all the tests.\n// And load the modules.
private static handleGetBlueprint(req = {}, res: Response, userId: string, blueprints: Blueprint[]) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default parameter value for 'req' is set to an empty object, which may not satisfy the expected properties of a Request. Consider explicitly typing 'req' as Request and removing the default value to prevent potential runtime errors.
private static handleGetBlueprint(req = {}, res: Response, userId: string, blueprints: Blueprint[]) { | |
private static handleGetBlueprint(req: Request, res: Response, userId: string, blueprints: Blueprint[]) { |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
TODO update docker images
Again, everything seems to be working...
Some more extenssive testing on staging will be in order. I want to check captcha. Not sure off hand if the node upgra
Update angular 14 to 15
Update node 14.18 to 18.17
Update npm 6.14 to 10.1
Update primeng 13 to 15
Update ng-recaptcha 9 to 11
Remove ngx-google-analytics